<?php

/**
 * Alumno form.
 *
 * @package    ecampus
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class AlumnoForm extends BaseAlumnoForm
{
      public function configure()
  {
       $this->disableLocalCSRFProtection();
  }

    public function  setupInheritance() {
        parent::setupInheritance();

        $this->widgetSchema['anio'] = new sfWidgetFormChoice(array(
            'choices' => Curso::getPosiblesAnios(),
            'expanded' => false,
            'label' => 'Año'
        ));

          $this->validatorSchema->setPostValidator(
              new sfValidatorAnd(array(
                new sfValidatorDoctrineUnique(array('model' => 'Alumno', 'column' => array('nombre_usuario'))),
                new sfValidatorDoctrineUnique(array('model' => 'Alumno', 'column' => array('email'))),
      ))
    );
    }
}
